<style>
#table{  border-collapse:collapse;}
#table th , #table td { border:solid 2px ; padding: 3px 7px 2px 7px;}
#table th { background-color:#0C3; padding-top:3px;}
#table td { background-color:#00FF00; }

</style>
<table align="center" id="table">
<tr align="center"><td colspan="8">QUẢN TRỊ DANH SÁCH GAME</td></tr>
<tr><th>STT</th><th>Tên Game</th><th>Image</th><th>Trạng Thái</th><th>Loại Game</th><th>Show</th><th>Chi Tiết</th><th>Hide</th></tr>
<?php

foreach($data as $rows)
{
	
	$seg=$this->uri->segment(3,0);
	
	$anh=base_url()."public/uploads/$rows[image]";

	$stt=$all-$rows['stt']+1;
		
		$chitiet=base_url()."index.php/theloai/getTin/$rows[stt]";
		if($rows['hide']==0)
		{
		$hide_link=base_url()."index.php/theloai/hide/$rows[stt]";
		}
		elseif($rows['hide']==1)
		{
			$hide_link=base_url()."index.php/theloai/un_hide/$rows[stt]";
			}
	if($rows['maloai']==1)
	{
		$loaigame="Game Online";
		
		}
	if($rows['maloai']==2)
	{
		$loaigame="Game Kinh Điển";
		}
	if($rows['trangthai']==1)
	{
		$trangthai="Game Hay";
		}
	if($rows['trangthai']==2)
	{
		$trangthai="Game Hay Nhất";
		}			
	if($rows['hide']==0)
	{
		$hide="Show";
		$un_hide="Hide";
		}
	if($rows['hide']==1)
	{
		$hide="Hide ";
		$un_hide="Show";
		}			
		
		
		

	echo "<tr><td>$stt</td><td>$rows[game]</td><td><img src=$anh width=40 height=40></td><td>$trangthai</td><td>$loaigame</td><td>$hide</td><td><a href=$chitiet>Chi Tiết</a></td><td><a href=$hide_link>$un_hide</a></td></tr>";
	}
?>
<tr><td colspan="8"><?php echo $this->pagination->create_links();?></td></tr>
</table>